package com.hyxt.consumer;


import com.alibaba.dubbo.config.annotation.Reference;

import com.hyxt.dao.RedisServiceDAO;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;

@Component
public class ServiceAdapter {

    //@Reference(version = "1.0.0")
    //IService serviceImpl;
    //redis缓存类接口
    @Reference(version = "1.0.0")
    RedisServiceDAO redisServiceImpl;

    public boolean setString(String key,String value,Integer dbIndex){
        return redisServiceImpl.setString(key,value,dbIndex);
    }

    public String getString(String key,Integer dbIndex){
        return redisServiceImpl.getString(key,dbIndex);
    }
    //发送消息
    public void sendMessage(String chennal,String message){
        redisServiceImpl.sendMessage(chennal, message);
    }
}
